﻿#include <qglgraphicsviewer.h>

class Particle
{
public :
  Particle();

  void init();
  void draw();
  void animate();

private :
  Vec speed_, pos_;
  int age_, ageMax_;
};


class Viewer : public QGLGraphicsViewer
{
protected :
  virtual void draw();
  virtual void initOnce()override;
    virtual void initOften()override;
  virtual void animate();
  virtual QString helpString() const;

private:
  int nbPart_;
  Particle* particle_;
};

